API Documentation
FileExplorer.h
1 // FileExplorer.h
3 //
5 
6 namespace nkWinUi
7 {
11  class DLL_WINUI_EXPORT FileExplorer : public Component
12  {
13  public :
14 
18  class FileFilter
19  {
20  public :
21 
22 
23  nkMemory::Strring _label ;
24  nkMemory::Strring _extension ;
25 
35  FileFilter (const FileFilter& other) ;
40  } ;
41 
42  public :
43 
52 
59  void addFilter (const nkMemory::StringView& label, const nkMemory::StringView& extension) ;
66  FileFilter& getFilter (unsigned int index) ;
74  void setFilter (unsigned int index, const nkMemory::StringView& label, const nkMemory::StringView& extension) ;
75 
81  void setFollowSelfDir (bool value) ;
85  bool getFollowSelfDir () const ;
91  void setCurrentDir (const nkMemory::StringView& path) ;
96 
103  virtual nkMemory::String openDialog (bool forSave) = 0 ;
104 
108  virtual void exportIntrospection (nkExport::Node* rootNode) override ;
112  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
113  } ;
114 }
nkWinUi::FileExplorer::getFollowSelfDir
bool getFollowSelfDir() const
nkWinUi::FileExplorer::setCurrentDir
void setCurrentDir(const nkMemory::StringView &path)
nkWinUi::FileExplorer::exportIntrospection
virtual void exportIntrospection(nkExport::Node *rootNode) override
nkWinUi::FileExplorer::FileFilter::~FileFilter
~FileFilter()
nkWinUi::FileExplorer::openDialog
virtual nkMemory::String openDialog(bool forSave)=0
nkWinUi::FileExplorer::FileFilter::FileFilter
FileFilter()
nkWinUi::FileExplorer::FileFilter
Used to filter files in the interface.
Definition: FileExplorer.h:19
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::FileExplorer::addFilter
void addFilter(const nkMemory::StringView &label, const nkMemory::StringView &extension)
nkWinUi::FileExplorer::getFilter
FileFilter & getFilter(unsigned int index)
nkWinUi::FileExplorer
A graphical file explorer.
Definition: FileExplorer.h:12
nkWinUi::FileExplorer::FileFilter::_extension
nkMemory::Strring _extension
The extensions filtered by the filter.
Definition: FileExplorer.h:24
nkWinUi::FileExplorer::setFilter
void setFilter(unsigned int index, const nkMemory::StringView &label, const nkMemory::StringView &extension)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkWinUi::FileExplorer::getCurrentDir
nkMemory::StringView getCurrentDir() const
nkWinUi::FileExplorer::FileExplorer
FileExplorer()
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkWinUi::FileExplorer::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkWinUi::FileExplorer::~FileExplorer
~FileExplorer()
nkWinUi::FileExplorer::setFollowSelfDir
void setFollowSelfDir(bool value)
nkWinUi::FileExplorer::FileFilter::_label
nkMemory::Strring _label
The label shown for the filter in the interface.
Definition: FileExplorer.h:23
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Button.h:7
nkWinUi::FileExplorer::FileFilter::FileFilter
FileFilter(const FileFilter &other)